package com.avalon.erp.addon.pet.service.shop.order;

import com.avalon.core.field.Field;
import com.avalon.core.field.Fields;
import com.avalon.core.service.AbstractService;
import com.avalon.erp.addon.pet.model.enums.OrderStateEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class PetOrderService extends AbstractService {
    @Override
    public String getServiceName() {
        return "pet.order";
    }

    @Override
    public String getLabel() {
        return "订单";
    }

    private final Field userId = Fields.createMany2one("用户", "pet.user");
    private final Field userName = Fields.createString("用户名");
    private final Field commodityId = Fields.createMany2one("商品", "pet.commodity");
    private final Field commodityName = Fields.createString("商品名");
    private final Field commodityPrice = Fields.createBigDecimal("商品价格");
    private final Field addressId = Fields.createMany2one("地址", "pet.address");
    private final Field address = Fields.createString("街道地址");
    private final Field province = Fields.createString("省");
    private final Field provinceCode = Fields.createMany2one("省code", "base.area.2023");
    private final Field city = Fields.createString("市");
    private final Field cityCode = Fields.createMany2one("市code", "base.area.2023");
    private final Field district = Fields.createString("区");
    private final Field districtCode = Fields.createMany2one("区code", "base.area.2023");
    private final Field longitude = Fields.createFloat("经度");
    private final Field latitude = Fields.createFloat("纬度");
    private final Field phone = Fields.createString("手机号");
    private final Field ReceiverName = Fields.createString("收货人姓名");
    private final Field postCode = Fields.createString("邮编");
    private final Field state = Fields.createSelection("订单状态", OrderStateEnum.class);

}
